<template>
	<view>
		<view class="top">
			<view class="today">今日交易0笔，合计</view>
			<view class="money">￥<text>0</text></view>
			<view class="record">
				<view class="collection" @click="click('goCollection')">收款记录</view>
				<view class="settlement" @click="click('goSettlement')">结算记录</view>
			</view>
		</view>
		<view class="content">
			<u-grid :border="true" col="2" @click="click">
				<u-grid-item v-for="(baseListItem,baseListIndex) in baseList" :key="baseListIndex" class="height">
					<u-icon :customStyle="{paddingTop:20+'rpx'}" :name="baseListItem.name" :size="100"></u-icon>
					<text class="grid-text">{{baseListItem.title}}</text>
				</u-grid-item>
			</u-grid>
			<u-toast ref="uToast" />
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				baseList: [{
						name: 'home',
						title: '扫码收款'
					},
					{
						name: 'home',
						title: '交易统计'
					},
					{
						name: 'home',
						title: '团队'
					},
					{
						name: 'home',
						title: '风控管理'
					},
					{
						name: 'home',
						title: '班结管理'
					},
					{
						name: 'home',
						title: '门店管理'
					},
					{
						name: 'home',
						title: '码牌设备'
					},
					{
						name: 'home',
						title: '个人中心'
					},
					// {
					// 	name: 'home',
					// 	title: '余额提现'
					// }
				]
			}
		},
		onLoad() {

		},
		methods: {
			click(e) {
				switch (e) {
					case 'goCollection':
						uni.navigateTo({
							url: "/pages/collection/collection",
						})
						break;
					case 'goSettlement':
						uni.navigateTo({
							url: "/pages/settlement/settlement",
						})
						break;
					case 0:
						uni.navigateTo({
							url: "/pages/code/code",
						})
						break;
					case 1:
						uni.navigateTo({
							url: "/pages/transation/transation",
						})
						break;
					case 2:
						uni.navigateTo({
							url: "/pages/team/team",
						})
						break;
					case 3:
						console.log('风控管理')
						break;
					case 4:
						console.log('班结管理')
						break;
					case 5:
						uni.navigateTo({
							url: "/pages/store/store",
						})
						break;
					case 6:
						console.log('码牌设备')
						break;
					case 7:
						uni.navigateTo({
							url: "/pages/user/user",
						})
						break;
						// case 8:
						// 	console.log('余额提现')
						// 	break;
				}



				// 
				// this.$refs.uToast.success(`点击了第${name}个`)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.top {
		height: 350rpx;
		background-color: #00a743;
		color: #fff;
		text-align: center;

		.today {
			padding-top: 40rpx;
		}

		.money {
			padding-top: 20rpx;
			font-weight: bolder;
			font-size: 50rpx;

			text {
				font-size: 88rpx;

			}
		}

		.record {
			display: flex;
			justify-content: space-around;
			padding-top: 60rpx;

			.collection {
				width: 50%;
				border-right: 2px solid #fff;
			}

			.settlement {
				width: 50%;
			}
		}
	}

	.content {

		// .grid {
		.grid-text {
			font-size: 14px;
			color: #000000;
			padding: 10rpx 0 20rpx 0rpx;
			/* #ifndef APP-PLUS */
			box-sizing: border-box;
			/* #endif */
		}

		// }
	}

	.height {
		height: 300rpx;
	}
</style>